﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            ApmetrixDLL.Apmetrix.init(100101, "C# Test 0.1", "90E874C97F0045A2904CF8BC85505543");
            
            this.label6.Text = ApmetrixDLL.Apmetrix.getThreadPack().ToString(); 
            this.label7.Text = ApmetrixDLL.Apmetrix.getThreadSessionCount().ToString();
            this.label8.Text = ApmetrixDLL.Apmetrix.getIP();
            this.label10.Text = ApmetrixDLL.Apmetrix.getUDID();
            
        }

        private void button2_Click(object sender, EventArgs e)
        {
            ApmetrixDLL.Apmetrix.CustomEvent table = ApmetrixDLL.CustomRPGEventData.getTable();
            string[] parameters = ApmetrixDLL.CustomRPGEventData.getParameters();
            ApmetrixDLL.Apmetrix.logEvent(table, parameters);
            this.label5.Text = ApmetrixDLL.Apmetrix.getThreadSession().ToString();
            this.label6.Text = ApmetrixDLL.Apmetrix.getThreadPack().ToString();
            this.label7.Text = ApmetrixDLL.Apmetrix.getThreadSessionCount().ToString();
            this.label8.Text = ApmetrixDLL.Apmetrix.getIP();
            this.label10.Text = ApmetrixDLL.Apmetrix.getUDID();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            ApmetrixDLL.Apmetrix.resetartSession();
            this.label5.Text = ApmetrixDLL.Apmetrix.getThreadSession().ToString();
            this.label6.Text = ApmetrixDLL.Apmetrix.getThreadPack().ToString();
            this.label7.Text = ApmetrixDLL.Apmetrix.getThreadSessionCount().ToString();
            this.label8.Text = ApmetrixDLL.Apmetrix.getIP();
            this.label10.Text = ApmetrixDLL.Apmetrix.getUDID();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            ApmetrixDLL.Apmetrix.endSession();
            this.label5.Text = ApmetrixDLL.Apmetrix.getThreadSession().ToString();
            this.label6.Text = ApmetrixDLL.Apmetrix.getThreadPack().ToString();
            this.label7.Text = ApmetrixDLL.Apmetrix.getThreadSessionCount().ToString();
            this.label8.Text = ApmetrixDLL.Apmetrix.getIP();
            this.label10.Text = ApmetrixDLL.Apmetrix.getUDID();
        }
    }
}
